package DailyPractice.Day3;

import java.util.Scanner;

/**
 *输出字符串中的数字
 * @author lumin
 * @date 2022/04/20 12:10
 **/
public class Num1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
//        String str = "abcd12345ed125";
        str = str + "z";
        String maxNumStr = "";
        int left = 0;
        while(left < str.length()){
            int right = left;
            if(48 <= str.charAt(left) && str.charAt(left) <= 57){
               while(right < str.length()){
                   if(48 <= str.charAt(right) && str.charAt(right) <= 57){
                       right++;
                   }else{
                       if(maxNumStr.length() > (right - left)){
                           left = right;
                           break;
                       }else{
                           maxNumStr = str.substring(left,right);
                           break;
                       }
                   }
               }
            }
            left++;
        }
        System.out.println(maxNumStr);
    }
}